*This Creates the Analysis is "Innumeracy in State Legislative Salaries"
*Christopher A. Cooper, Public Opinion Quarterly. Forthcoming*
*contact ccooper@email.wcu.edu with questions*

*create party match variables*

****

*Results I: Describing Innumeracy*

*mean estimates from Figure 1*
summarize salaryestimate if state=="CA" 
summarize salaryestimate if state=="NC" 
summarize salaryestimate if state=="NH"
summarize salaryestimate if state=="WI"

*This produces the results from Table 1*
summarize abssalarydiff if state=="CA", detail
summarize abssalarydiff if state=="NC", detail
summarize abssalarydiff if state=="NH", detail
summarize abssalarydiff if state=="WI", detail

*results II: the Direct Effects of Correcting Innumeracy*

*This produces the results from Table 2*
tab  q7 experimentalcondition, column chi2 
tab  q7 experimentalcondition  if state=="CA", column chi2
tab  q7 experimentalcondition  if state=="NC", column chi2 
tab  q7 experimentalcondition  if state=="NH", column chi2 
tab  q7 experimentalcondition  if state=="WI", column chi2 

*Stated differently, the Average Treatment Effect (ATE) is....*
teffects ipw (q7recode) (experimentalcondition)
teffects ipw (q7recode) (experimentalcondition) if state=="CA"
teffects ipw (q7recode) (experimentalcondition) if state=="NC"
teffects ipw (q7recode) (experimentalcondition) if state=="NH"
teffects ipw (q7recode) (experimentalcondition) if state=="WI"

*This produces the results found in Table 3*
tab overpaidrecode
tab overpaidrecode experimentalcondition, column chi2
tab overpaidrecode experimentalcondition if state=="CA", column chi2
tab overpaidrecode experimentalcondition if state=="NH", column chi2
tab overpaidrecode experimentalcondition if state=="NC", column chi2
tab overpaidrecode experimentalcondition if state=="WI", column chi2

*This produces the average treatment effects referred to in the text
teffects ipw (overpaidrecode) (experimentalcondition)
teffects ipw (overpaidrecode) (experimentalcondition) if state=="CA"
teffects ipw (overpaidrecode) (experimentalcondition) if state=="NC"
teffects ipw (overpaidrecode) (experimentalcondition) if state=="NH"
teffects ipw (overpaidrecode) (experimentalcondition) if state=="WI"

*Results III: The Indirect Effects of Correcting Innumeracy*

*This produces the results found in Table 4*

tab q9_1
tab q9_1 experimentalcondition, column chi2
tab q9_1 experimentalcondition if state=="CA", column chi2
tab q9_1 experimentalcondition if state=="NH", column chi2
tab q9_1 experimentalcondition if state=="NC", column chi2
tab q9_1 experimentalcondition if state=="WI", column chi2

tab q9_2
tab q9_2 experimentalcondition, column chi2
tab q9_2 experimentalcondition if state=="CA", column chi2
tab q9_2 experimentalcondition if state=="NH", column chi2
tab q9_2 experimentalcondition if state=="NC", column chi2
tab q9_2 experimentalcondition if state=="WI", column chi2


tab q9_3
tab q9_3 experimentalcondition, column chi2
tab q9_3 experimentalcondition if state=="CA", column chi2
tab q9_3 experimentalcondition if state=="NH", column chi2
tab q9_3 experimentalcondition if state=="NC", column chi2
tab q9_3 experimentalcondition if state=="WI", column chi2


tab q9_5
tab q9_5 experimentalcondition, column chi2
tab q9_5 experimentalcondition if state=="CA", column chi2
tab q9_5 experimentalcondition if state=="NH", column chi2
tab q9_5 experimentalcondition if state=="NC", column chi2
tab q9_5 experimentalcondition if state=="WI", column chi2



